<?php

namespace app\api\controller;

use app\common\controller\Api;
use app\common\model\Money;

/**
 * 首页接口
 */
class Phone extends Api
{
    protected $noNeedLogin = [];
    protected $noNeedRight = ['*'];

    /**
     * 查询缴费历史
     *
     */
    public function index()
    {
        $where['user_id'] = $this->auth->id;
        $list = Money::where($where)->paginate()->each(function($item, $key) {
            $item['user'] =  $this->auth->getUserinfo();
        });

        $this->success('list', $list);
    }
}
